import time
from time import sleep
from selenium.webdriver.support.select import Select
from Finance_fun.base.base import Base
from Finance_fun import page

'''以下为我的推广的界面操作'''
class Page_My_Promotion(Base):
    # 点击我的推广链接
    def click_my_promotion_link(self):
        self.base_click(page.my_promotion)

    # 我的推广输入框
    def input_my_promotion_search(self, msg):
        self.base_input(page.my_promotion_search, msg)

    # 点击搜索按钮
    def click_my_promotion_search_btn(self):
        self.base_click(page.my_promotion_search_btn)

    # 点击登录链接
    def page_click_login_link(self):
        self.base_click(page.login_link)

    # 输入登录手机号
    def page_input_login_phone(self, phone):
        self.base_input(page.login_phone, phone)

    # 输入登录密码
    def page_input_login_password(self, password):
        self.base_input(page.login_password, password)

    # 点击登录按钮
    def page_click_login_btn(self):
        self.base_click(page.login_btn)

    # 集成登录操作
    def page_login(self, phone, password):
        self.page_input_login_phone(phone)
        self.page_input_login_password(password)
        self.page_click_login_btn()
        sleep(1)